<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of tt_effrank</title>
  <meta name="keywords" content="tt_effrank">
  <meta name="description" content="Effective rank of the TT-tensor (correct memory definition)">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html v1.5 &copy; 2003-2005 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../../index.html">Home</a> &gt;  <a href="#">tt2</a> &gt; <a href="index.html">core</a> &gt; tt_effrank.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../../index.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for tt2/core&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>-->

<h1>tt_effrank
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>Effective rank of the TT-tensor (correct memory definition)</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>function [reff]=tt_effrank(tt,s) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre class="comment">Effective rank of the TT-tensor (correct memory definition)
   [REFF]=TT_EFFRANK(TT,S)
 May 26, 2011
 Vladimir Kazeev
 vladimir.kazeev@gmail.com
 INM RAS
 Moscow, Russia</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../../matlabicon.gif)">
<li><a href="../../tt2/@tt_matrix/mem.html" class="code" title="function [mm]=mem(tt)">mem</a>	Computes the number of parameters in the TT-matrix</li><li><a href="../../tt2/@tt_matrix/size.html" class="code" title="function [sz] = size(tt)">size</a>	Mode sizes of the TT-matrix</li><li><a href="../../tt2/@tt_tensor/mem.html" class="code" title="function [mm]=mem(tt)">mem</a>	Computes memory for TT-tensor (only for cores)</li><li><a href="../../tt2/@tt_tensor/size.html" class="code" title="function [sz] = size(tt,dim)">size</a>	Mode sizes of the TT-tensor</li><li><a href="tt_qsize.html" class="code" title="function [sz]=tt_qsize(tt,s)">tt_qsize</a>	For a QTT decomposition _tt_,</li></ul>
This function is called by:
<ul style="list-style-image:url(../../matlabicon.gif)">
</ul>
<!-- crossreference -->



<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function [reff]=tt_effrank(tt,s)</a>
0002 <span class="comment">%Effective rank of the TT-tensor (correct memory definition)</span>
0003 <span class="comment">%   [REFF]=TT_EFFRANK(TT,S)</span>
0004 <span class="comment">% May 26, 2011</span>
0005 <span class="comment">% Vladimir Kazeev</span>
0006 <span class="comment">% vladimir.kazeev@gmail.com</span>
0007 <span class="comment">% INM RAS</span>
0008 <span class="comment">% Moscow, Russia</span>
0009 
0010 d=<a href="../../tt2/@tt_matrix/size.html" class="code" title="function [sz] = size(tt)">size</a>(tt,1);
0011 sz=<a href="tt_qsize.html" class="code" title="function [sz]=tt_qsize(tt,s)">tt_qsize</a>(tt,s);
0012 n=prod(sz,2);
0013 <a href="../../tt2/@tt_matrix/mem.html" class="code" title="function [mm]=mem(tt)">mem</a>=0;
0014 <span class="keyword">for</span> k=1:d
0015     <a href="../../tt2/@tt_matrix/mem.html" class="code" title="function [mm]=mem(tt)">mem</a>=<a href="../../tt2/@tt_matrix/mem.html" class="code" title="function [mm]=mem(tt)">mem</a>+numel(tt{k});
0016 <span class="keyword">end</span>
0017 a=sum(n(2:d-1));
0018 b=n(1)+n(d);
0019 reff=sqrt(<a href="../../tt2/@tt_matrix/mem.html" class="code" title="function [mm]=mem(tt)">mem</a>/a+b^2/a^2/4)-b/a/2;
0020 
0021 <span class="keyword">return</span>
0022 <span class="keyword">end</span></pre></div>
<hr><address>Generated on Wed 08-Feb-2012 18:20:24 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body>
</html>